package com.iap.common.translator
{
	import com.iap.app.translator.Translator;
	import com.iap.common.model.User;
	
	import flash.utils.getQualifiedClassName;

	public class UserTranslator extends Translator
	{
		public static function translate(obj:Object):User
		{
			return translateFromObject(obj, getQualifiedClassName(User)) as User;
		}

		public static function translateFromArray(data:Array):Array
		{
			var list:Array = new Array();
			for each(var obj:Object in data)
			{
				list.push(translate(obj));
			}
			return list;
		}
	}
}